<?php

namespace Database\Seeders\Tenant;

use App\Models\PrintTemplate;
use Illuminate\Database\Seeder;

class PrintTemplatesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run(): void
    {
        $templates = [
            [
                'name'    => '收费单(241mmX140mm)',
                'type'    => 'charge_detail',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"name":null,"paperType":"自定义","height":140,"width":241,"paperHeader":79.5,"paperFooter":309,"printElements":[{"options":{"left":166.5,"top":15,"height":30,"width":382,"title":"收费单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0,"right":547.99609375,"bottom":45,"vCenter":356.99609375,"hCenter":30,"fontFamily":"Microsoft YaHei"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":64.5,"height":9.75,"width":140,"title":"顾客卡号","right":139.5,"bottom":87.75,"vCenter":79.5,"hCenter":82.875,"field":"customer.idcard","testData":"202006180001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":222,"top":64.5,"height":9.75,"width":120,"title":"顾客姓名","right":342,"bottom":87.75,"vCenter":282,"hCenter":82.875,"field":"customer.name","testData":"张晓磊","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":363,"top":64.5,"height":9.75,"width":120,"title":"收费编号","right":393.99609375,"bottom":185.25,"vCenter":333.99609375,"hCenter":180.375,"field":"key","testData":"202006250001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":90,"height":36,"width":648,"title":"文本2","field":"details","right":568.75,"bottom":142.5,"vCenter":293.75,"hCenter":124.5,"coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":352.14606719894573,"title":"项目/产品名称","field":"product_name","checked":true,"columnId":"product_name","fixed":false,"rowspan":1,"colspan":1,"align":"left","halign":"center","vAlign":"middle","formatter2":"function(value,row,index,options){ return row.product_name ? row.product_name : row.goods_name; }","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":73.55316587412594,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value, row, index, options) {\n  return row.specs || '';\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":81.10206958579876,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value,row,index,options){\n\treturn row.payable ? (row.payable / row.times).toFixed(2) : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":80.80249272644522,"title":"数量","field":"times","checked":true,"columnId":"times","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":60.39620461468436,"title":"小计","field":"payable","checked":true,"columnId":"payable","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value,row,index,options){\n\treturn value ? value : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":19,"top":313.5,"height":9.75,"width":120,"title":"应收金额","field":"payable","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":326.5,"height":9.75,"width":140,"title":"收银人员","field":"operator_user.name","testData":"胡图图","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":326.5,"height":10,"width":120,"title":"实收金额","field":"income","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":344,"height":9.75,"width":120,"title":"欠款金额","field":"arrearage","testData":"0","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":344,"height":9.75,"width":140,"title":"收银时间","field":"created_at","testData":"2020-06-18 10:50:40","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":360,"height":11,"width":200,"title":"支付方式","field":"payment_methods","testData":"支付宝:50、现金:50","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":360,"height":10,"width":140,"title":"顾客签领:","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":375,"height":9.75,"width":200,"title":"友情提示:治疗期满凭此单据一个月内换取发票.","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18,"top":378,"height":9.75,"width":246,"title":"白联：记账  红联：核销  绿联：医生  蓝联：顾客  黄联：存根","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":598.5,"paperNumberTop":10.5,"paperNumberFormat":"第${paperNo}/页共${paperCount}页","orient":2,"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '退款单(241mmX140mm)',
                'type'    => 'cashier_refund',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"name":null,"paperType":"自定义","height":140,"width":241,"paperHeader":79.5,"paperFooter":309,"printElements":[{"options":{"left":166.5,"top":15,"height":30,"width":382,"title":"退款单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0,"right":547.99609375,"bottom":45,"vCenter":356.99609375,"hCenter":30,"fontFamily":"Microsoft YaHei"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":64.5,"height":9.75,"width":140,"title":"顾客卡号","right":139.5,"bottom":87.75,"vCenter":79.5,"hCenter":82.875,"field":"customer.idcard","testData":"202006180001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":222,"top":64.5,"height":9.75,"width":120,"title":"顾客姓名","right":342,"bottom":87.75,"vCenter":282,"hCenter":82.875,"field":"customer.name","testData":"张晓磊","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":363,"top":64.5,"height":9.75,"width":120,"title":"收费编号","right":393.99609375,"bottom":185.25,"vCenter":333.99609375,"hCenter":180.375,"field":"key","testData":"202006250001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":90,"height":36,"width":648,"title":"文本2","field":"details","right":568.75,"bottom":142.5,"vCenter":293.75,"hCenter":124.5,"coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":413.1271095522442,"title":"项目/产品名称","field":"product_name","checked":true,"columnId":"product_name","fixed":false,"rowspan":1,"colspan":1,"align":"left","halign":"center","vAlign":"middle","formatter2":"function(value,row,index,options){ return row.product_name ? row.product_name : row.goods_name; }","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":101.09864608169714,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value, row, index, options) {\n  return row.specs || '';\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":64.73758275446943,"title":"数量","field":"times","checked":true,"columnId":"times","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":69.03666161158921,"title":"小计","field":"payable","checked":true,"columnId":"payable","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value,row,index,options){\n\treturn value ? value : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":19,"top":327,"height":9.75,"width":120,"title":"应收金额","field":"payable","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":326.5,"height":9.75,"width":140,"title":"收银人员","field":"operator_user.name","testData":"胡图图","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":343,"height":10,"width":120,"title":"实收金额","field":"income","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":344,"height":9.75,"width":140,"title":"收银时间","field":"created_at","testData":"2020-06-18 10:50:40","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":357,"height":11,"width":200,"title":"支付方式","field":"payment_methods","testData":"支付宝:50、现金:50","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":360,"height":10,"width":140,"title":"顾客签领:","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":375,"height":9.75,"width":200,"title":"友情提示:治疗期满凭此单据一个月内换取发票.","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18,"top":373.5,"height":9.75,"width":246,"title":"白联：记账  红联：核销  绿联：医生  蓝联：顾客  黄联：存根","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":598.5,"paperNumberTop":10.5,"paperNumberFormat":"第${paperNo}/页共${paperCount}页","orient":2,"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '还款单(241mmX140mm)',
                'type'    => 'cashier_repayment',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"name":null,"paperType":"自定义","height":140,"width":241,"paperHeader":79.5,"paperFooter":319.5,"printElements":[{"options":{"left":166.5,"top":15,"height":30,"width":382,"title":"还款单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0,"right":547.99609375,"bottom":45,"vCenter":356.99609375,"hCenter":30,"fontFamily":"Microsoft YaHei"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":64.5,"height":9.75,"width":140,"title":"顾客卡号","right":139.5,"bottom":87.75,"vCenter":79.5,"hCenter":82.875,"field":"customer.idcard","testData":"202006180001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":222,"top":64.5,"height":9.75,"width":120,"title":"顾客姓名","right":342,"bottom":87.75,"vCenter":282,"hCenter":82.875,"field":"customer.name","testData":"张晓磊","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":363,"top":64.5,"height":9.75,"width":120,"title":"收费编号","right":393.99609375,"bottom":185.25,"vCenter":333.99609375,"hCenter":180.375,"field":"key","testData":"202006250001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":90,"height":36,"width":648,"title":"文本2","field":"details","right":568.75,"bottom":142.5,"vCenter":293.75,"hCenter":124.5,"coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":352.14606719894573,"title":"项目/产品名称","field":"product_name","checked":true,"columnId":"product_name","fixed":false,"rowspan":1,"colspan":1,"align":"left","halign":"center","vAlign":"middle","formatter2":"function(value,row,index,options){ return row.product_name ? row.product_name : row.goods_name; }","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":73.55316587412594,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value, row, index, options) {\n  return row.specs || '';\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":81.10206958579876,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value,row,index,options){\n\treturn value ? value : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":80.80249272644522,"title":"数量","field":"times","checked":true,"columnId":"times","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":60.39620461468436,"title":"小计","field":"payable","checked":true,"columnId":"payable","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value,row,index,options){\n\treturn value ? value : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":19,"top":325.5,"height":9.75,"width":120,"title":"应收金额","field":"payable","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":326.5,"height":9.75,"width":140,"title":"收银人员","field":"operator_user.name","testData":"胡图图","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":343,"height":10,"width":120,"title":"实收金额","field":"income","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":344,"height":9.75,"width":140,"title":"收银时间","field":"created_at","testData":"2020-06-18 10:50:40","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":360,"height":11,"width":200,"title":"支付方式","field":"payment_methods","testData":"支付宝:50、现金:50","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":360,"height":10,"width":140,"title":"顾客签领:","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":485,"top":375,"height":9.75,"width":200,"title":"友情提示:治疗期满凭此单据一个月内换取发票.","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18,"top":378,"height":9.75,"width":246,"title":"白联：记账  红联：核销  绿联：医生  蓝联：顾客  黄联：存根","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":598.5,"paperNumberTop":10.5,"paperNumberFormat":"第${paperNo}/页共${paperCount}页","orient":2,"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '进货入库单(241mmX140mm)',
                'type'    => 'purchase_detail',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"自定义","height":140,"width":241,"paperHeader":75,"paperFooter":325.5,"printElements":[{"options":{"left":226.5,"top":9,"height":24,"width":205.5,"title":"进货入库单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0,"right":431.25,"bottom":24,"vCenter":328.5,"hCenter":19.125},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":496.5,"top":43,"height":9.75,"width":130,"title":"合计金额","field":"amount","testData":"1460","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":626.74609375,"bottom":47.7421875,"vCenter":561.74609375,"hCenter":42.8671875},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":226.5,"top":43.5,"height":9.75,"width":130,"title":"供应厂商","field":"supplier.name","testData":"淘宝","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":356.74609375,"bottom":52.74609375,"vCenter":291.74609375,"hCenter":47.87109375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":43.5,"height":9.75,"width":130,"title":"单据日期","field":"date","testData":"2020-12-12","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":226.5,"top":61,"height":9.75,"width":130,"title":"进货仓库","field":"warehouse.name","testData":"药房","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":358.99609375,"bottom":72.99609375,"vCenter":293.99609375,"hCenter":68.12109375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":61.5,"height":9.75,"width":130,"title":"单据编号","field":"key","testData":"RKD202012120001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":132.24609375,"bottom":70.74609375,"vCenter":72.24609375,"hCenter":65.87109375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":85.5,"height":36,"width":660,"title":"文本2","field":"details","coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":159.86232246306668,"title":"商品名称","field":"goods_name","checked":true,"columnId":"goods_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":101.81257290279629,"title":"生产厂家","field":"manufacturer_name","checked":true,"columnId":"manufacturer_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":76.18071599163831,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":66.03681239754532,"title":"生产日期","field":"production_date","checked":true,"columnId":"production_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":51.298378323304945,"title":"过期时间","field":"expiry_date","checked":true,"columnId":"expiry_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":55.56655764110723,"title":"批号","field":"batch_code","checked":true,"columnId":"batch_code","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":43.01394310833661,"title":"数量","field":"number","checked":true,"columnId":"number","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":37.286387434789795,"title":"单位","field":"unit_name","checked":true,"columnId":"unit_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":37.34375110776638,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":31.598558629648483,"title":"小计","field":"amount","checked":true,"columnId":"amount","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":100,"title":"列名称","field":"name","checked":false,"columnId":"name","fixed":false,"rowspan":1,"colspan":1,"align":"left"}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":13.5,"top":335.5,"height":9.75,"width":130,"title":"经办人员","field":"user.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":145,"bottom":357,"vCenter":80,"hCenter":352.125,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":543,"top":335.5,"height":9.75,"width":135,"title":"录单时间","field":"created_at","testData":"2023-12-12 14:38:44","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":671.5,"bottom":333,"vCenter":606.5,"hCenter":328.125,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":357.5,"height":9.75,"width":130,"title":"审核人员","field":"auditor.name","testData":"李四","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":146.5,"bottom":372.75,"vCenter":81.5,"hCenter":367.875,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":543,"top":357.5,"height":9.75,"width":135,"title":"审核时间","field":"check_time","testData":"2023-12-12 14:38:44","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":673,"bottom":359.25,"vCenter":608,"hCenter":354.375,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":376.5,"height":9.75,"width":130,"title":"录入人员","field":"create_user.name","testData":"王五","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":146.5,"bottom":372.75,"vCenter":81.5,"hCenter":367.875,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":543,"top":377.5,"height":9.75,"width":135,"title":"打印时间","field":"print_at","testData":"2023-12-12 14:38:44","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":670.99609375,"bottom":376.5,"vCenter":605.99609375,"hCenter":371.625,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":600,"paperNumberTop":7.5,"paperNumberFormat":"第${paperNo}页/共${paperCount}页","orient":2,"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '科室领料单(241mmX140mm)',
                'type'    => 'department_picking',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"自定义","height":140,"width":241,"paperHeader":81,"paperFooter":331.5,"printElements":[{"options":{"left":246,"top":10.5,"height":24,"width":171,"title":"科室领料单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0,"right":416.25,"bottom":42,"vCenter":330.75,"hCenter":30},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":43.5,"height":9.75,"width":120,"title":"领料科室","field":"department.name","testData":"皮肤科","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":46.5,"height":9.75,"width":120,"title":"领料日期","field":"date","testData":"2023-06-1","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":67,"height":9.75,"width":120,"title":"出库仓库","field":"warehouse.name","testData":"总仓","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":375,"bottom":86.25,"vCenter":315,"hCenter":81.375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":67.5,"height":9.75,"width":168,"title":"单据编号","field":"key","testData":"KSLL202101190002","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":198,"bottom":79.5,"vCenter":114,"hCenter":74.625},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":85.5,"height":39,"width":658.5,"title":"文本2","field":"details","right":681.75,"bottom":121.5,"vCenter":348.75,"hCenter":103.5,"coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":165.85565534926064,"title":"商品名称","field":"goods_name","checked":true,"columnId":"goods_name","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":84.08608636799866,"title":"生产厂家","field":"manufacturer_name","checked":true,"columnId":"manufacturer_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":55.068804531107205,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":59.0705917910802,"title":"生产日期","field":"production_date","checked":true,"columnId":"production_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":56.047823255221616,"title":"过期时间","field":"dd","checked":true,"columnId":"dd","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":65.09697506777765,"title":"批号","field":"batch_code","checked":true,"columnId":"batch_code","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.019059660571685,"title":"数量","field":"number","checked":true,"columnId":"number","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.4530716315061,"title":"单位","field":"unit_name","checked":true,"columnId":"unit_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":52.91007613558083,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":53.891856209895444,"title":"小计","field":"amount","checked":true,"columnId":"amount","fixed":false,"rowspan":1,"colspan":1,"align":"center"}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":18,"top":337.5,"height":9.75,"width":120,"title":"领料人员","field":"user.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":342,"height":9.75,"width":135,"title":"录单时间","field":"created_at","testData":"2021-01-19 10:34:00","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":672.24609375,"bottom":328.74609375,"vCenter":612.24609375,"hCenter":323.87109375,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":17.5,"top":356.5,"height":9.75,"width":120,"title":"审核人员","field":"auditor.name","testData":"李四","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":357,"height":9.75,"width":135,"title":"审核时间","field":"check_time","testData":"2021-01-19 10:34:05","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":673.5,"bottom":342.75,"vCenter":606,"hCenter":337.875,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":372,"height":9.75,"width":135,"title":"打印时间","field":"print_at","testData":"2023-6-1 11:57:04","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":664.5,"bottom":359.25,"vCenter":604.5,"hCenter":354.375,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18.5,"top":372.5,"height":9.75,"width":120,"title":"合计金额","field":"amount","testData":"3400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":621,"paperNumberTop":4.5,"paperNumberFormat":"第${paperNo}页/共${paperCount}页","orient":2,"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '库存调拨(241mmX140mm)',
                'type'    => 'inventory_transfer',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"自定义","height":140,"width":241,"paperHeader":81,"paperFooter":331.5,"printElements":[{"options":{"left":246,"top":10.5,"height":24,"width":171,"title":"库存调拨单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":43.5,"height":9.75,"width":120,"title":"出库仓库","field":"out_warehouse.name","testData":"总库","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":46.5,"height":9.75,"width":120,"title":"调拨日期","field":"date","testData":"2023-06-1","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":67,"height":9.75,"width":120,"title":"入库仓库","field":"in_warehouse.name","testData":"药房","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":67.5,"height":9.75,"width":168,"title":"单据编号","field":"key","testData":"DBD202503120001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":85.5,"height":39,"width":658.5,"title":"文本2","field":"details","coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":165.85565534926064,"title":"商品名称","field":"goods_name","checked":true,"columnId":"goods_name","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":84.08608636799866,"title":"生产厂家","field":"manufacturer_name","checked":true,"columnId":"manufacturer_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":55.068804531107205,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":59.0705917910802,"title":"生产日期","field":"production_date","checked":true,"columnId":"production_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":56.047823255221616,"title":"过期时间","field":"dd","checked":true,"columnId":"dd","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":65.09697506777765,"title":"批号","field":"batch_code","checked":true,"columnId":"batch_code","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.019059660571685,"title":"数量","field":"number","checked":true,"columnId":"number","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.4530716315061,"title":"单位","field":"unit_name","checked":true,"columnId":"unit_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":52.91007613558083,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":53.891856209895444,"title":"小计","field":"amount","checked":true,"columnId":"amount","fixed":false,"rowspan":1,"colspan":1,"align":"center"}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":18,"top":337.5,"height":9.75,"width":120,"title":"领料人员","field":"user.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":342,"height":9.75,"width":135,"title":"录单时间","field":"created_at","testData":"2021-01-19 10:34:00","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":17.5,"top":356.5,"height":9.75,"width":120,"title":"审核人员","field":"auditor.name","testData":"李四","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":357,"height":9.75,"width":135,"title":"审核时间","field":"check_time","testData":"2021-01-19 10:34:05","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":372,"height":9.75,"width":135,"title":"打印时间","field":"print_at","testData":"2023-6-1 11:57:04","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18.5,"top":372.5,"height":9.75,"width":120,"title":"合计金额","field":"amount","testData":"3400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":621,"paperNumberTop":4.5,"paperNumberContinue":true,"paperNumberFormat":"第${paperNo}页/共${paperCount}页","orient":2,"overPrintOptions":{},"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '报损单(241mmX140mm)',
                'type'    => 'inventory_loss',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"自定义","height":140,"width":241,"paperHeader":81,"paperFooter":331.5,"printElements":[{"options":{"left":246,"top":10.5,"height":24,"width":171,"title":"报损单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":43.5,"height":9.75,"width":120,"title":"所在仓库","field":"warehouse.name","testData":"总库","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":46.5,"height":9.75,"width":120,"title":"单据日期","field":"date","testData":"2023-06-1","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":67,"height":9.75,"width":120,"title":"报损科室","field":"department.name","testData":"皮肤科","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":67.5,"height":9.75,"width":168,"title":"单据编号","field":"key","testData":"BSD202503140002","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":85.5,"height":39,"width":658.5,"title":"文本2","field":"details","coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":165.85565534926064,"title":"商品名称","field":"goods_name","checked":true,"columnId":"goods_name","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":84.08608636799866,"title":"生产厂家","field":"manufacturer_name","checked":true,"columnId":"manufacturer_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":55.068804531107205,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":59.0705917910802,"title":"生产日期","field":"production_date","checked":true,"columnId":"production_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":56.047823255221616,"title":"过期时间","field":"dd","checked":true,"columnId":"dd","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":65.09697506777765,"title":"批号","field":"batch_code","checked":true,"columnId":"batch_code","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.019059660571685,"title":"数量","field":"number","checked":true,"columnId":"number","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.4530716315061,"title":"单位","field":"unit_name","checked":true,"columnId":"unit_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":52.91007613558083,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":53.891856209895444,"title":"小计","field":"amount","checked":true,"columnId":"amount","fixed":false,"rowspan":1,"colspan":1,"align":"center"}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":18,"top":337.5,"height":9.75,"width":120,"title":"经办人员","field":"user.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":342,"height":9.75,"width":135,"title":"录单时间","field":"created_at","testData":"2021-01-19 10:34:00","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":17.5,"top":356.5,"height":9.75,"width":120,"title":"审核人员","field":"check_user.name","testData":"李四","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":357,"height":9.75,"width":135,"title":"审核时间","field":"check_time","testData":"2021-01-19 10:34:05","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":372,"height":9.75,"width":135,"title":"打印时间","field":"print_at","testData":"2023-6-1 11:57:04","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18.5,"top":372.5,"height":9.75,"width":120,"title":"报损总额","field":"amount","testData":"3400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":621,"paperNumberTop":4.5,"paperNumberContinue":true,"paperNumberFormat":"第${paperNo}页/共${paperCount}页","orient":2,"overPrintOptions":{},"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '报溢单(241mmX140mm)',
                'type'    => 'inventory_overflow',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"自定义","height":140,"width":241,"paperHeader":81,"paperFooter":331.5,"printElements":[{"options":{"left":246,"top":10.5,"height":24,"width":171,"title":"报溢单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":43.5,"height":9.75,"width":120,"title":"所在仓库","field":"warehouse.name","testData":"总库","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":46.5,"height":9.75,"width":120,"title":"单据日期","field":"date","testData":"2023-06-1","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":240,"top":67,"height":9.75,"width":120,"title":"报溢科室","field":"department.name","testData":"皮肤科","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":67.5,"height":9.75,"width":168,"title":"单据编号","field":"key","testData":"BYD202503130002","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":85.5,"height":39,"width":658.5,"title":"文本2","field":"details","coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":165.85565534926064,"title":"商品名称","field":"goods_name","checked":true,"columnId":"goods_name","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":84.08608636799866,"title":"生产厂家","field":"manufacturer_name","checked":true,"columnId":"manufacturer_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":55.068804531107205,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":59.0705917910802,"title":"生产日期","field":"production_date","checked":true,"columnId":"production_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":56.047823255221616,"title":"过期时间","field":"dd","checked":true,"columnId":"dd","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":65.09697506777765,"title":"批号","field":"batch_code","checked":true,"columnId":"batch_code","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.019059660571685,"title":"数量","field":"number","checked":true,"columnId":"number","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.4530716315061,"title":"单位","field":"unit_name","checked":true,"columnId":"unit_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":52.91007613558083,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":53.891856209895444,"title":"小计","field":"amount","checked":true,"columnId":"amount","fixed":false,"rowspan":1,"colspan":1,"align":"center"}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":18,"top":337.5,"height":9.75,"width":120,"title":"经办人员","field":"user.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":342,"height":9.75,"width":135,"title":"录单时间","field":"created_at","testData":"2021-01-19 10:34:00","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":17.5,"top":356.5,"height":9.75,"width":120,"title":"审核人员","field":"check_user.name","testData":"李四","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":357,"height":9.75,"width":135,"title":"审核时间","field":"check_time","testData":"2021-01-19 10:34:05","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":538.5,"top":372,"height":9.75,"width":135,"title":"打印时间","field":"print_at","testData":"2023-6-1 11:57:04","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18.5,"top":372.5,"height":9.75,"width":120,"title":"报溢总额","field":"amount","testData":"3400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":621,"paperNumberTop":4.5,"paperNumberContinue":true,"paperNumberFormat":"第${paperNo}页/共${paperCount}页","orient":2,"overPrintOptions":{},"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '收费单-发票(24mmX9.3mm)',
                'type'    => 'charge_detail_invoice',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"height":93,"width":240,"paperHeader":0,"paperFooter":263.6220472440945,"printElements":[{"options":{"left":82.5,"top":55.5,"height":9.75,"width":120,"field":"customer.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":192,"top":102,"height":9.75,"width":120,"title":"文本","field":"expense_categories.检查费","testData":"200","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":94.5,"top":156,"height":9.75,"width":120,"field":"expense_categories.治疗费","testData":"5000","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0,"title":"文本"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":94.5,"top":189,"height":9.75,"width":120,"title":"文本","right":216,"bottom":198.75,"vCenter":156,"hCenter":193.875,"field":"income","testData":"伍仟元整","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0,"upperCase":"7"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":654,"paperNumberTop":246,"paperNumberDisabled":true,"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '退货出库单(241mmX140mm)',
                'type'    => 'purchase_return',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"自定义","height":140,"width":241,"paperHeader":75,"paperFooter":327,"printElements":[{"options":{"left":234,"top":1.5,"height":37.5,"width":200,"title":"退货出库","right":434,"bottom":39,"vCenter":334,"hCenter":20.25,"coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":198,"top":39,"height":9.75,"width":150,"title":"退货厂商","field":"supplier_name","testData":"淘宝","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":433.5,"top":39,"height":9.75,"width":120,"title":"合计金额","right":555,"bottom":48,"vCenter":495,"hCenter":43.125,"field":"amount","testData":"1500","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":39,"height":9.75,"width":130,"title":"单据日期","field":"date","testData":"2023-06-013","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":198,"top":58.5,"height":9.75,"width":150,"title":"退货仓库","field":"warehouse.name","testData":"药房","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":348,"bottom":68.25,"vCenter":273,"hCenter":63.375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":58.5,"height":9.75,"width":130,"title":"单据编号","field":"key","testData":"RKD202012120001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":134.49609375,"bottom":68.49609375,"vCenter":74.49609375,"hCenter":63.62109375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":13.5,"top":82.5,"height":36,"width":654,"title":"文本2","field":"details","coordinateSync":false,"widthHeightSync":false,"fontSize":7.5,"columns":[[{"width":163.10833430998957,"title":"商品名称","field":"goods_name","checked":true,"columnId":"goods_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":82.71528246864878,"title":"生产厂家","field":"manufacturer_name","checked":true,"columnId":"manufacturer_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":61.79575544197286,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":60.786924426855464,"title":"生产日期","field":"production_date","checked":true,"columnId":"production_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":61.8017700265362,"title":"过期时间","field":"expiry_date","checked":true,"columnId":"expiry_date","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":68.75270476905425,"title":"批号","field":"batch_code","checked":true,"columnId":"batch_code","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":35.87918676695337,"title":"数量","field":"number","checked":true,"columnId":"number","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":33.90101850364356,"title":"单位","field":"unit_name","checked":true,"columnId":"unit_name","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":36.867722154019134,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":48.391301132326774,"title":"小计","field":"amount","checked":true,"columnId":"amount","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":100,"title":"列名称","field":"name","checked":false,"columnId":"name","fixed":false,"rowspan":1,"colspan":1,"align":"left"}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":530,"top":333,"height":9.75,"width":140,"title":"录单时间","field":"created_at","testData":"2023-01-20 11:10:17","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":672.5,"bottom":342.75,"vCenter":602.5,"hCenter":337.875,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":336,"height":9.75,"width":120,"title":"经办人员","field":"user.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":136.5,"bottom":354,"vCenter":76.5,"hCenter":349.125,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":354,"height":9.75,"width":120,"title":"审核人员","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":133.5,"bottom":372.75,"vCenter":73.5,"hCenter":367.875,"field":"auditor.name","testData":"李四","showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":530,"top":354,"height":9.75,"width":140,"title":"审核时间","field":"check_time","testData":"2023-01-20 11:10:17","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":674.24609375,"bottom":362.49609375,"vCenter":604.24609375,"hCenter":357.62109375,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":530,"top":372,"height":9.75,"width":140,"title":"打印时间","field":"print_at","testData":"2023-01-20 11:10:17","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":672.9921875,"bottom":381.4921875,"vCenter":602.9921875,"hCenter":376.6171875,"showInPage":"last"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":16.5,"top":372,"height":9.75,"width":120,"title":"录单人员","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":132.99609375,"bottom":390.24609375,"vCenter":72.99609375,"hCenter":385.37109375,"field":"create_user.name","testData":"王五","showInPage":"last"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":622.5,"paperNumberTop":3,"paperNumberFormat":"第${paperNo}页/共${paperCount}页","orient":2,"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '收费汇总表(A4)',
                'type'    => 'cashier_collection',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"A4","height":210,"width":297,"paperHeader":7.5,"paperFooter":573,"printElements":[{"options":{"left":322.5,"top":21,"height":15,"width":120,"title":"收费汇总表","coordinateSync":false,"widthHeightSync":false,"fontSize":12,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0,"right":441.75,"bottom":35.25,"vCenter":381.75,"hCenter":27.75},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":7.5,"top":46.5,"height":105,"width":828,"field":"rows","groupFooterFormatter":"function(U, v) {\n              return \"\\u8FD9\\u91CC\\u81EA\\u5B9A\\u4E49\\u7EDF\\u8BA1\\u811A\\u4FE1\\u606F\";\n            }","groupFieldsFormatter":"function(groupData,options){ return [\"name\"] }","coordinateSync":false,"widthHeightSync":false,"textAlign":"center","right":834.75,"bottom":150.75,"vCenter":420.75,"hCenter":98.25,"tableHeaderFontSize":6,"tableHeaderFontWeight":"lighter","columns":[[{"width":61.789727723928465,"title":"营业日期","field":"date","checked":true,"columnId":"date","fixed":false,"rowspan":2,"colspan":1,"halign":"center","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":76.34273006589493,"title":"实收金额","field":"income","checked":true,"columnId":"income","fixed":false,"rowspan":2,"colspan":1,"halign":"center","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":65.13053187962295,"title":"营业金额","field":"turnover","checked":true,"columnId":"turnover","fixed":false,"rowspan":2,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":60.350059135894135,"title":"退款金额","field":"refund","checked":true,"columnId":"refund","fixed":false,"rowspan":2,"colspan":1,"halign":"center","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":100,"title":"账户类别","checked":true,"fixed":false,"rowspan":1,"colspan":10,"halign":"center","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""}],[{"width":53.49002957587592,"title":"余额支付","field":"pay1","checked":true,"columnId":"pay1","fixed":false,"rowspan":1,"colspan":1,"align":"center","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":54.452018123061634,"title":"现金支付","field":"pay2","checked":true,"columnId":"pay2","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":48.76711044445276,"title":"微信","field":"pay3","checked":true,"columnId":"pay3","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":57.678619586877886,"title":"支付宝","field":"pay4","checked":true,"columnId":"pay4","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":49.95883662464483,"title":"刷卡","field":"pay5","checked":true,"columnId":"pay5","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":64.25211233718868,"title":"美团支付","field":"pay6","checked":true,"columnId":"pay6","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":66.67197035786637,"title":"第三方支付","field":"pay7","checked":true,"columnId":"pay7","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":62.56992478091467,"title":"抵用卷支付","field":"pay8","checked":true,"columnId":"pay8","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":58.96329997785628,"title":"会员卡支付","field":"pay9","checked":true,"columnId":"pay9","fixed":false,"rowspan":1,"colspan":1,"tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":58.083029385920476,"title":"分期付款","field":"pay10","checked":true,"columnId":"pay10","fixed":false,"rowspan":1,"colspan":1,"align":"center","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""}]]},"printElementType":{"title":"表格","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}}],"paperNumberLeft":565,"paperNumberTop":573,"rotate":true,"overPrintOptions":{},"watermarkOptions":{}}]}
EOT
            ],
            [
                'name'    => '开票管理(24mmX9.3mm)',
                'type'    => 'cashier_invoice',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"index":0,"name":1,"paperType":"自定义","height":100,"width":210,"paperHeader":0,"paperFooter":280.64516129032256,"printElements":[{"options":{"left":48,"top":54,"height":9.75,"width":120,"field":"customer.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0,"right":166.5,"bottom":65.25,"vCenter":106.5,"hCenter":60.375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":408,"top":70.5,"height":9.75,"width":120,"field":"customer.name","testData":"张三","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0,"right":492.75,"bottom":85.5,"vCenter":432.75,"hCenter":80.625},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":408,"top":90,"height":9.75,"width":120,"title":"费用类别占位","right":493.5,"bottom":99.75,"vCenter":433.5,"hCenter":94.875,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"field":"expense_categories","testData":"治疗费","hideTitle":true,"formatter":"function(title,value,options,templateData,target){\n\treturn Object.keys(value).join('、');\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":181.5,"top":94.5,"height":36,"width":180,"title":"文本2","field":"details","coordinateSync":false,"widthHeightSync":false,"right":463,"bottom":102,"vCenter":329,"hCenter":84,"tableBorder":"noBorder","tableHeaderBorder":"noBorder","tableHeaderCellBorder":"noBorder","tableBodyRowBorder":"noBorder","tableBodyCellBorder":"noBorder","tableFooterBorder":"noBorder","tableFooterCellBorder":"noBorder","tableHeaderRepeat":"none","columns":[[{"width":80.00975053770746,"title":"项目/产品名称","field":"name","checked":true,"columnId":"name","fixed":false,"rowspan":1,"colspan":1,"align":"left","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":28.008080080367396,"title":"数量","field":"times","checked":true,"columnId":"times","fixed":false,"rowspan":1,"colspan":1,"align":"center"},{"width":39.007408632871154,"title":"单价","checked":true,"fixed":false,"rowspan":1,"colspan":1,"align":"center","formatter2":"function(value,row,index,options){\n\treturn row.payable ? (row.payable / row.times).toFixed(2) : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":32.974760749054,"title":"金额","field":"payable","checked":true,"columnId":"payable","fixed":false,"rowspan":1,"colspan":1,"align":"center","formatter2":"function(value,row,index,options){\n\treturn value ? value : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":181.74783796085572,"title":"列名称","field":"name","checked":false,"columnId":"name","fixed":false,"rowspan":1,"colspan":1,"align":"center","styler2":"function(value,row,index,options){ return row.product_name ? row.product_name : row.goods_name; }","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":63,"top":145.5,"height":9.75,"width":120,"title":"文本","field":"expense_categories.检查费","testData":"200","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0,"right":180,"bottom":155.25,"vCenter":120,"hCenter":150.375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":63,"top":163.5,"height":9.75,"width":120,"field":"expense_categories.治疗费","testData":"5000","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0,"title":"文本","right":180,"bottom":173.25,"vCenter":120,"hCenter":168.375},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":61.5,"top":192,"height":9.75,"width":120,"title":"文本","right":180,"bottom":188.25,"vCenter":120,"hCenter":183.375,"field":"amount","testData":"伍仟元整","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0,"upperCase":"7"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":409.5,"top":213,"height":9.75,"width":120,"title":"总金额","right":492.99609375,"bottom":207.99609375,"vCenter":432.99609375,"hCenter":203.12109375,"field":"amount","testData":"300","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":21,"top":235.5,"height":9.75,"width":120,"title":"收费日期","right":141,"bottom":230.25,"vCenter":81,"hCenter":225.375,"field":"updated_at","testData":"2023-06-07","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":171,"top":237,"height":9.75,"width":120,"title":"收费员","right":291,"bottom":222.75,"vCenter":231,"hCenter":217.875,"field":"create_user.name","testData":"徐杨","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":409.5,"top":238.5,"height":9.75,"width":120,"title":"收费日期","right":525,"bottom":240.75,"vCenter":465,"hCenter":235.875,"field":"updated_at","testData":"2023-06-07","coordinateSync":false,"widthHeightSync":false,"hideTitle":true,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":565,"paperNumberTop":246,"paperNumberDisabled":true,"overPrintOptions":{},"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ],
            [
                'name'    => '零售收费(241mmX140mm)',
                'type'    => 'cashier_retail',
                'default' => 1,
                'system'  => 1,
                'content' =>
                    <<<'EOT'
{"panels":[{"name":null,"paperType":"自定义","height":140,"width":241,"paperHeader":79.5,"paperFooter":303,"printElements":[{"options":{"left":166.5,"top":15,"height":30,"width":382,"title":"收费单","coordinateSync":false,"widthHeightSync":false,"fontSize":18,"textAlign":"center","textContentVerticalAlign":"middle","qrCodeLevel":0,"right":547.99609375,"bottom":45,"vCenter":356.99609375,"hCenter":30,"fontFamily":"Microsoft YaHei"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":64.5,"height":9.75,"width":140,"title":"顾客卡号","right":139.5,"bottom":87.75,"vCenter":79.5,"hCenter":82.875,"field":"customer.idcard","testData":"202006180001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":222,"top":64.5,"height":9.75,"width":120,"title":"顾客姓名","right":342,"bottom":87.75,"vCenter":282,"hCenter":82.875,"field":"customer.name","testData":"张晓磊","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":363,"top":64.5,"height":9.75,"width":120,"title":"收费编号","right":393.99609375,"bottom":185.25,"vCenter":333.99609375,"hCenter":180.375,"field":"key","testData":"202006250001","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":90,"height":36,"width":580,"title":"文本2","field":"details","right":568.75,"bottom":142.5,"vCenter":293.75,"hCenter":124.5,"coordinateSync":false,"widthHeightSync":false,"columns":[[{"width":315.1924675546119,"title":"项目/产品名称","field":"product_name","checked":true,"columnId":"product_name","fixed":false,"rowspan":1,"colspan":1,"align":"left","halign":"center","vAlign":"middle","formatter2":"function(value,row,index,options){ return row.product_name ? row.product_name : row.goods_name; }","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":65.83462377622384,"title":"规格","field":"specs","checked":true,"columnId":"specs","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value, row, index, options) {\n  return row.specs || '';\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":72.59135857988161,"title":"单价","field":"price","checked":true,"columnId":"price","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value,row,index,options){\n\treturn row.payable ? (row.payable / row.times).toFixed(2) : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""},{"width":72.32321879836147,"title":"数量","field":"times","checked":true,"columnId":"times","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle"},{"width":54.05833129092119,"title":"小计","field":"payable","checked":true,"columnId":"payable","fixed":false,"rowspan":1,"colspan":1,"align":"center","vAlign":"middle","formatter2":"function(value,row,index,options){\n\treturn value ? value : 0;\n}","tableQRCodeLevel":0,"tableSummaryTitle":true,"tableSummary":""}]]},"printElementType":{"title":"表格2 ","type":"table","editable":true,"columnDisplayEditable":true,"columnDisplayIndexEditable":true,"columnTitleEditable":true,"columnResizable":true,"columnAlignEditable":true,"isEnableEditField":true,"isEnableContextMenu":true,"isEnableInsertRow":true,"isEnableDeleteRow":true,"isEnableInsertColumn":true,"isEnableDeleteColumn":true,"isEnableMergeCell":true}},{"options":{"left":19,"top":307.5,"height":9.75,"width":120,"title":"应收金额","field":"payable","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":320.5,"height":10,"width":120,"title":"实收金额","field":"income","testData":"5400","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":401.5,"top":321,"height":9.75,"width":140,"title":"收银人员","field":"operator_user.name","testData":"胡图图","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":625.0000610351562,"bottom":330.24476623535156,"vCenter":555.0000610351562,"hCenter":325.36976623535156},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":402,"top":337.5,"height":9.75,"width":140,"title":"收银时间","field":"updated_at","testData":"2020-06-18 10:50:40","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":338,"height":9.75,"width":120,"title":"欠款金额","field":"arrearage","testData":"0","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"formatter":"function(title,value,options,templateData,target){\n\treturn value ? value : 0;\n}"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":19,"top":354,"height":11,"width":200,"title":"支付方式","field":"payment_methods","testData":"支付宝:50、现金:50","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":402,"top":354,"height":10,"width":140,"title":"顾客签领:","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":402,"top":369,"height":9.75,"width":200,"title":"友情提示:治疗期满凭此单据一个月内换取发票.","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":18,"top":372,"height":9.75,"width":246,"title":"白联：记账  红联：核销  绿联：医生  蓝联：顾客  黄联：存根","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":540,"paperNumberTop":15,"paperNumberFormat":"第${paperNo}/页共${paperCount}页","orient":2,"overPrintOptions":{},"watermarkOptions":{"content":"","fillStyle":"rgba(184, 184, 184, 0.3)","fontSize":"14px","rotate":25,"width":200,"height":200,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]}
EOT
            ]
        ];
        foreach ($templates as $template) {
            PrintTemplate::query()->firstOrCreate(['type' => $template['type']], $template);
        }
    }
}
